package Test01;

import java.awt.*;

/**
 * Created with IntelliJ IDEA
 * Description:
 * User: YKH
 * Date: 2022-05-04
 * Time: 22:45
 * author:TestFlowLayout
 */
public class TestFlowLayout {
    public static void main(String[] args) {
        Frame frame = new Frame();

        //组件--按钮
        Button button1 = new Button("botton1");
        Button button2 = new Button("botton2");
        Button button3 = new Button("botton3");
        //设置流式布局
        frame.setLayout(new FlowLayout(FlowLayout.LEFT));
        frame.setBounds(100,200,300,200);
        frame.add(button1);
        frame.add(button2);
        frame.add(button3);

        frame.setVisible(true);
    }
}
